(define (make-point x y)
  (cons x y))

(define (x-point point)
  (car point))

(define (y-point point)
  (cdr point))

;两个点确定一个矩形
(define (make-rect northwest southeast)
  (cons northwest southeast))

(define (northwest rect)
  (car rect))

(define (southest rect)
  (cdr rect))

(define (width rect)
  (abs (- (x-point (northwest rect) (x-point (southeast rect))))))

(define (height rect)
  (abs (- (y-point (northwest rect) (y-point (southeast rect))))))

(define (area rect)
  (* (width rect) (height rect)))

;左上角的点和宽 高确定一个矩形
(define (make-rect northwest width height)
  (cons northwest width height) 

(define (northwest rect)
  (car rect))

(define (width rect)
  (cdr (car rect)))

(define (height rect)
  (cdr (cdr rect))
